package com.mcrmb;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

public class Mcrmb extends JavaPlugin {
    public static Mcrmb plugin;
    //public static YamlConfiguration vipYaml;
    //public static CommandSender sender;
    public static FileConfiguration configs;//配置内容静态存储在主类,避免老是重复调用

    public void onEnable() {
        plugin = this;
        saveDefaultConfig();
        configs = Mcrmb.plugin.getConfig();
        getLogger().info("配置文件已载入,欢迎访问www.mcrmb.com查看说明!");
    }

    public void reload(){
        Mcrmb.plugin.reloadConfig();//重载插件
        configs = Mcrmb.plugin.getConfig();
    }

    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        //System.out.println("有相应指令就触发");
        CommandListen com = new CommandListen();
        if (com.commands(sender, command, label, args)) {
            return true;
        }
        return false;
    }

    public void onDisable() {
        getLogger().info("插件已停止! 感谢使用www.mcrmb.com");
    }



}
